//
//  OwnedCompanyViewController.m
//  firstpoint
//
//  Created by 泽中 on 2017/7/27.
//  Copyright © 2017年 xzcysoft. All rights reserved.
//

#import "OwnedCompanyViewController.h"
#import "BinDingTextView.h"
@interface OwnedCompanyViewController ()
{
    BinDingTextView*name;
    BinDingTextView*gongsi;

}
@end

@implementation OwnedCompanyViewController
-(void)myInfoHttpRequest
{  NSString*tokenStr= OBJECT_FOR_KEY(@"token");
    NSString*urlStr=[NSString stringWithFormat:@"/user/accountInfo.api?access_token=%@",tokenStr];
    [HTTPURL postRequest:LINK_BASE_URL(urlStr) parameters:nil success:^(NSURLSessionDataTask *task, id responseObject) {
        NSLog(@"%@",responseObject);
        
        NSDictionary*dic= [PublicTools dictionaryWithJsonString:responseObject[@"data"][@"userDTO"]];
        
        name.textField.text=dic[@"realName"];
        gongsi.textField.text=dic[@"isCompany"];

        
        
    } filure:^(NSURLSessionDataTask *task, id error) {
        
    }];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title=@"所属公司";
    self.view.backgroundColor=[UIColor whiteColor];
    [self setUI];
}
-(void)setUI
{
    name=[[BinDingTextView alloc]initWithFrame:CGRectMake(0, 74, width_screen, 45)];
    
    name.titleLab.text=@"姓名";
    name.textField.userInteractionEnabled=NO;
    [self.view addSubview:name];
    
    
    gongsi=[[BinDingTextView alloc]initWithFrame:CGRectMake(0, 120, width_screen, 45)];
    
    gongsi.titleLab.text=@"所属公司";
    gongsi.textField.userInteractionEnabled=NO;
    [self.view addSubview:gongsi];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
